package cn.edu.swpu.cins.u_chain.frontend.entity.persistence.user.company;

import cn.edu.swpu.cins.u_chain.frontend.entity.dto.user.company.CompanyInfo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@AllArgsConstructor
@NoArgsConstructor
@Data
public class CompanyInfoDB {
    private int companyId;
    private String companyName;
    private String businessLicence;
    private int userId;
    private String legalPerson;

    public CompanyInfoDB(CompanyInfo companyInfo) {
        this.companyName = companyInfo.getCompanyName();
        this.businessLicence = companyInfo.getBusinessLicence();
        this.userId = companyInfo.getUserId();
        this.legalPerson = companyInfo.getLegalPerson();
    }
}
